package com.jt.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

@Data
@NoArgsConstructor
@AllArgsConstructor
@Accessors(chain = true)  //链式加载规则(底层从写了set方法)

// 1.实现对象与表的映射
@TableName  //表名全部小写
public class User {
    //pojo实体类对象中属性类型必须使用包装类型

    @TableId(type = IdType.AUTO)  //设定主键自增
    private Integer id;
    private String name;
    private Integer age;
    private String sex;

}
